package com.ruoyi.project.abucoder.detail.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.abucoder.detail.mapper.PrizeDetailMapper;
import com.ruoyi.project.abucoder.detail.domain.PrizeDetail;
import com.ruoyi.project.abucoder.detail.service.IPrizeDetailService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 抽奖明细Service业务层处理
 * 
 * @author wuyy
 * @date 2024-04-28
 */
@Service
public class PrizeDetailServiceImpl implements IPrizeDetailService 
{
    @Autowired
    private PrizeDetailMapper prizeDetailMapper;

    /**
     * 查询抽奖明细
     * 
     * @param id 抽奖明细主键
     * @return 抽奖明细
     */
    @Override
    public PrizeDetail selectPrizeDetailById(Long id)
    {
        return prizeDetailMapper.selectPrizeDetailById(id);
    }

    /**
     * 查询抽奖明细列表
     * 
     * @param prizeDetail 抽奖明细
     * @return 抽奖明细
     */
    @Override
    public List<PrizeDetail> selectPrizeDetailList(PrizeDetail prizeDetail)
    {
        return prizeDetailMapper.selectPrizeDetailList(prizeDetail);
    }

    /**
     * 新增抽奖明细
     * 
     * @param prizeDetail 抽奖明细
     * @return 结果
     */
    @Override
    public int insertPrizeDetail(PrizeDetail prizeDetail)
    {
        return prizeDetailMapper.insertPrizeDetail(prizeDetail);
    }
    @Override
    public void insertPrizeDetailBath(List<PrizeDetail> prizeDetail)
    {
         prizeDetailMapper.insertPrizeDetailBath(prizeDetail);
    }
    /**
     * 修改抽奖明细
     * 
     * @param prizeDetail 抽奖明细
     * @return 结果
     */
    @Override
    public int updatePrizeDetail(PrizeDetail prizeDetail)
    {
        return prizeDetailMapper.updatePrizeDetail(prizeDetail);
    }

    /**
     * 批量删除抽奖明细
     * 
     * @param ids 需要删除的抽奖明细主键
     * @return 结果
     */
    @Override
    public int deletePrizeDetailByIds(String ids)
    {
        return prizeDetailMapper.deletePrizeDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除抽奖明细信息
     * 
     * @param id 抽奖明细主键
     * @return 结果
     */
    @Override
    public int deletePrizeDetailById(Long id)
    {
        return prizeDetailMapper.deletePrizeDetailById(id);
    }
}
